package com.wash.shoes.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wash.shoes.domain.dto.OrderTransportPageDto;
import com.wash.shoes.domain.dto.ShopStsXcxDto;
import com.wash.shoes.entity.OrderTransportPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 订单的商品 Mapper 接口
 * </p>
 *
 * @author ljg
 * @since 2024-09-16
 */
public interface OrderTransportMapper extends BaseMapper<OrderTransportPo> {

    /**
     * @author lijianguo
     * @Date 16/09/2024
     * 请输入方法的简介
     **/
    List<OrderTransportPo> getByOrderId(@Param("orderId") String orderId);

    /**
     * @author lijianguo
     * @Date 16/09/2024
     * 请输入方法的简介
     **/
    OrderTransportPo getOneByOrderId(@Param("orderId") String orderId);

    /**
     * @author lijianguo
     * @Date 16/09/2024
     * 查询
     **/
    List<OrderTransportPo> pageList(@Param("page") Page page, @Param("transportPo") OrderTransportPageDto transportPo, @Param("shopId") String shopId, @Param("userBindType") String userBindType);

    /**
     * @author lijianguo
     * @Date 17/09/2024
     * 请输入方法的简介
     **/
    OrderTransportPo getByWayBillCode(@Param("wayBillCode") String wayBillCode);

    /**
     * @author lijianguo
     * @Date 09/10/2024
     * 请输入方法的简介
     **/
    OrderTransportPo getOneByOrderIdType(@Param("orderId") String orderId, @Param("type") String type);

    /**
     * @param shopStsXcxDto
     * @param shopIdStr
     * @return 运输的数量
     */
    Integer incomeOrderNum(@Param("shopStsXcxDto") ShopStsXcxDto shopStsXcxDto, @Param("shopIdStr") String shopIdStr, @Param("userBindType") String userBindType);

    /**
     * @return
     */
    OrderTransportPo getLastTransport();

    /**
     * @param orderNo
     * @param type
     * @return
     */
    OrderTransportPo getOneByOrderNoType(@Param("orderNo") String orderNo, @Param("type") String type);

}
